package com.jiinfo.model;

import java.util.List;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Record;

public class RoleResource extends Model<RoleResource>{

	private static final long serialVersionUID = -1708128327175836538L;
	public static final RoleResource dao = new RoleResource();
	
	public void deleteRoleResourceByRoleId(String roleId){
		String sql="delete from t_role_resource where roleId=?";
		Db.update(sql,roleId);
	}
	
	public List<Record> getRoleResourceByRoleId(String roleId){
		String sql="select *from t_role_resource t where t.removed='0' and roleId=?";
		return Db.find(sql,roleId);
	}
}
